import request from '@/utils/request';

import { BASE_URL, OWNER_URL } from '@/config/query';

export async function queryAlarmToday() {
  return Promise.all([
    request(`${BASE_URL}/device_alarm/today_detail`),
    request(`${BASE_URL}/risk/state/count`),
  ]);
}

export async function queryFire() {
  return request(`${BASE_URL}/device_alarm/fire/week/chart`);
}

export async function queryDanger() {
  return request(`${BASE_URL}/device_alarm/danger/week/chart`);
}

export async function queryPosition() {
  return request(`${BASE_URL}/rule_task/index_list`);
}

export async function queryMonitor() {
  return request(`${BASE_URL}/device/type_count_list`);
}

export async function queryIncidence() {
  return request(`${BASE_URL}/device_alarm/month/page`)
}

export async function queryFace(id) {
  return request(`${OWNER_URL}/owner/exam/detail/${id}`)
}

export async function queryOwner() {
  return request(`${OWNER_URL}/owner/my/detail_info`)
}
